const HtmlWebpackPlugin = require('html-webpack-plugin')

module.exports = {
  entry: './src/index.js',
  output: {
    filename: 'build.js'
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        loader: 'babel-loader'
      }
    ]
  },
  resolve: {
    extensions: [
      '.js' // add this
    ]
  },
  plugins: [new HtmlWebpackPlugin()],
  devServer: {
    contentBase: './dist',
    port: '8888',
    host: 'localhost',
    open: true
  },
  mode: 'development'
}
